export CC?=gcc
export RM?=rm -f

CFLAGS=`pkg-config --cflags gtk+-2.0 librsvg-2.0 gthread-2.0` -g -Wall -rdynamic
OPTIFLAGS=`pkg-config --cflags gtk+-2.0 librsvg-2.0 gthread-2.0` -O4 -Wall -rdynamic
LIBS=`pkg-config --libs gtk+-2.0 librsvg-2.0 gthread-2.0` -lm -lpthread -ldl
STRICTFLAGS=-Wextra -Wall -pedantic -Wshadow \
	    -Wmissing-declarations -Wpointer-arith -Wcast-align \
	    -Wfloat-equal -Wstrict-prototypes -Wmissing-prototypes \
	    -Wredundant-decls -Wunused-variable -Wunused-parameter \
	    -Wparentheses -Wno-long-long -Wwrite-strings -Wimplicit \
	    -Wnested-externs -Wno-unused -Wundef -Wpacked \
	    -Wbad-function-cast -Wunused-function -Wunused-label \
	    -Wunused-value -Wfloat-equal -Wchar-subscripts -Wswitch \
	    -Wmissing-braces -Wsequence-point -Wunknown-pragmas \
	    -Wdeclaration-after-statement -Wsign-compare


all: build

optibuild:
	$(CC) *.c $(LIBS) $(OPTIFLAGS)

build:
	$(CC) *.c $(LIBS) $(CFLAGS)

strict:
	$(CC) *.c $(LIBS) $(CFLAGS) $(STRICTFLAGS)

oclean:
	$(RM) *.o *.i *.s

clean: oclean
	$(RM) a.out

veryclean: clean
	$(RM) *~
